package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.mapper.StrategyCommentMapper;
import cn.wolfcode.trip.base.query.StrategyCommentQueryObject;
import cn.wolfcode.trip.base.service.IStrategyCommentService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StrategyCommentServiceImpl implements IStrategyCommentService{
    @Autowired
    private StrategyCommentMapper strategyCommentMapper;

    @Override
    public PageInfo query(StrategyCommentQueryObject qo) {
        PageHelper.startPage(qo.getCurrentPage(),qo.getPageSize(),qo.getOrderBy());
        List list = strategyCommentMapper.selectForList(qo);
        return new PageInfo(list);
    }

    @Override
    public List selectTagsByStrategyId(StrategyCommentQueryObject qo) {
        return strategyCommentMapper.selectTagsByStrategyId(qo);
    }
}
